package com.ticket.system.mapper;

import com.ticket.system.domain.YanchuStatistics;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 【请填写功能名称】Mapper接口
 * 
 * @author ruoyi
 * @date 2024-03-14
 */
public interface YanchuStatisticsMapper 
{
    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public YanchuStatistics selectYanchuStatisticsById(Long id);

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param yanchuStatistics 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<YanchuStatistics> selectYanchuStatisticsList(YanchuStatistics yanchuStatistics);

    public List<Map<String,Object>> selectStatisticsList(@Param("staticsDate") String staticsDate);

    /**
     * 演出数量统计
     * @return
     */
    public List<Map<String,Object>> performStatics();

    /**
     * 新增【请填写功能名称】
     * 
     * @param yanchuStatistics 【请填写功能名称】
     * @return 结果
     */
    public int insertYanchuStatistics(YanchuStatistics yanchuStatistics);

    /**
     * 修改【请填写功能名称】
     * 
     * @param yanchuStatistics 【请填写功能名称】
     * @return 结果
     */
    public int updateYanchuStatistics(YanchuStatistics yanchuStatistics);

    /**
     * 删除【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteYanchuStatisticsById(Long id);

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYanchuStatisticsByIds(Long[] ids);

    /**
     * 统计前一天销售额,订单数
     * @param prevDate
     * @return
     */
    public YanchuStatistics staticsPrevOrder(@Param("prevDate")String prevDate);

    /**
     * 统计前一天票数
     * @param prevDate
     * @return
     */
    public YanchuStatistics staticsPrevOrderTicket(@Param("prevDate")String prevDate);

    /**
     * 统计前一天用户数
     * @param prevDate
     * @return
     */
    public YanchuStatistics staticsPrevUsers(@Param("prevDate")String prevDate);

    public List<YanchuStatistics> staticsAllPrevUsers();
    public List<YanchuStatistics> staticsAllPrevOrderTicket();
    public List<YanchuStatistics> staticsAllPrevOrder();

    /**
     * 统计用户趋势
     * @return
     */
    public Long selectStatisticsUser();

    /**
     * 统计销售额
     * @return
     */
    public YanchuStatistics staticsOrder();

    public YanchuStatistics staticsOrderToday();
    public YanchuStatistics staticsTicketCountToday();

    public YanchuStatistics staticsALlOrder();
    public YanchuStatistics staticsAllOrderTicket();
    /**
     * 下单用户数
     * @return
     */
    public Long selectOrderUser();

    public Long selectReOrderUser();

    public Long selectPerformCount();

    public Long selectSessionCount();

    public Long selectPrevCount(@Param("prevDate") String prevDate);

    public int insertBatch(@Param("array") List<YanchuStatistics> array);
    @MapKey("id")
    public List<Map<String,Object>> listSessionByPerform(@Param("sessionIds")String sessionIds);
    @MapKey("seatNumsExpectCollect")
    List<Map<String,Object>> listSessionCollectByPerform(@Param("sessionIds")String sessionIds);
    @MapKey("performId")
    public List<Map<String,Object>> listSessionOrderByPerformFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("seatNumsProgCollect")
    List<Map<String,Object>> listSessionOrderCollectByPerformFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("performId")
    public List<Map<String,Object>> listSessionOrderByPerformFromBackend(@Param("sessionIds")String sessionIds);
    @MapKey("ticketNumsTuanCollect")
    List<Map<String,Object>> listSessionCollectOrderByPerformFromBackend(@Param("sessionIds")String sessionIds);

    @MapKey("id")
    public List<Map<String,Object>> listSessionBySession(@Param("sessionIds")String sessionIds);
    @MapKey("id")
    List<Map<String,Object>> listSessionCollectBySession(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    public List<Map<String,Object>> listSessionOrderBySessionFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("id")
    List<Map<String,Object>> listSessionOrderCollectBySessionFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("performId")
    public List<Map<String,Object>> listSessionOrderBySessionFromBackend(@Param("sessionIds")String sessionIds);
    @MapKey("id")
    List<Map<String,Object>> listSessionCollectOrderBySessionFromBackend(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    public List<Map<String,Object>> listDetailsByPerforms(@Param("sessionIds")String sessionIds);

    @MapKey("sessionId")
    public List<Map<String,Object>> listDetailsByTicketPrices(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    public List<Map<String,Object>> listDetailsBySessions(@Param("sessionIds")String sessionIds);
    @MapKey("priceId")
    public List<Map<String,Object>> listDetailsByTicketPricesFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("priceId")
    public List<Map<String,Object>> listDetailsByTicketPriceFromBackend(@Param("sessionIds")String sessionIds);
    @MapKey("sessionId")
    List<Map<String,Object>> listDetailsByTicketPricesCollect(@Param("sessionIds")String sessionIds);
    @MapKey("id")
    List<Map<String,Object>> listDetailsCollectFromProg(@Param("sessionIds")String sessionIds);
    @MapKey("ticketNumsTuanCollect")
    List<Map<String,Object>> listDetailsCollectFromBackend(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    List<Map<String,Object>> listDetailsByPerformTicketPricesCollect(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    List<Map<String,Object>> listDetailsCollectByPerformFromProg(@Param("sessionIds")String sessionIds);

    @MapKey("performId")
    List<Map<String,Object>> listDetailsCollectByPerformFromBackend(@Param("sessionIds")String sessionIds);
}
